package com.plate.frame.base.tags;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

/**
 * 
 * @author Rainsponsor
 * @描述:命牌标签
 */
public class TokenTag extends TagSupport {

	private static final long serialVersionUID = 1L;

	public int doStartTag() throws JspException {
		JspWriter out = this.pageContext.getOut();
		String token = String.valueOf(this.pageContext.getSession().getAttribute("token"));
		try {
			StringBuilder text = new StringBuilder("<input type='hidden' name='token' value='"+token+"'/>");
			out.print(text.toString());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return super.doStartTag();
	}


}
